package com.iceberg.dao.impl.database;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.metadata.ClassMetadata;
import org.hibernate.persister.entity.AbstractEntityPersister;

import com.iceberg.dao.database.DatabaseDAO;
import com.iceberg.model.customer.Customer;
import com.iceberg.model.database.Column;
import com.iceberg.model.database.Schema;
import com.iceberg.model.database.Table;
import com.iceberg.model.database.TableData;
import com.iceberg.model.database.View;
import com.iceberg.model.jqgrid.JqGridTable;

public class DatabaseHibernateDAOImpl implements DatabaseDAO {
  private SessionFactory sessionFactory;

  public SessionFactory getSessionFactory() {
    return sessionFactory;
  }

  public void setSessionFactory(SessionFactory sessionFactory) {
    this.sessionFactory = sessionFactory;
  }

  

  public void queryTableData(String tableName) {

    SessionFactory sessionFactory = getSessionFactory();
    Map<String, ClassMetadata> allClassMetadataMap = sessionFactory.getAllClassMetadata();
   
    
    return ;

  }

  @Override
  public List<Schema> getSchemaList(String databaseName) {
    //TODO Auto-generated method stub
    throw new IllegalStateException("liyang didn't do his work!");
  }

  @Override
  public List<Table> getTableList(String catalogName, String schemeName) {
    //TODO Auto-generated method stub
    throw new IllegalStateException("liyang didn't do his work!");
  }

  @Override
  public List<View> getViewList(String catalogName, String schemeName) {
    //TODO Auto-generated method stub
    throw new IllegalStateException("liyang didn't do his work!");
  }

  @Override
  public List<Column> getColumnList(String catalogName, String schemaName, String tableName) {
    //TODO Auto-generated method stub
    throw new IllegalStateException("liyang didn't do his work!");
  }

 

  @Override
  public Boolean dataUpdate(String tableName, Map<String, Object> parameters) {
    //TODO Auto-generated method stub
    throw new IllegalStateException("liyang didn't do his work!");
  }

  @Override
  public Boolean dataCreate(String tableName, Map<String, Object> parameters) {
    //TODO Auto-generated method stub
    throw new IllegalStateException("liyang didn't do his work!");
  }

  @Override
  public Boolean dataDelete(String tableName, Map<String, Object> parameters) {
    //TODO Auto-generated method stub
    throw new IllegalStateException("liyang didn't do his work!");
  }

  @Override
  public Table getTable(String catalogName, String schemeName, String tableName) {
    //TODO Auto-generated method stub
    throw new IllegalStateException("liyang didn't do his work!");
  }

  @Override
  public List<Column> getPrimaryKeyColumnList(String catalogName, String schemaName, String tableName) {
    //TODO Auto-generated method stub
    throw new IllegalStateException("liyang didn't do his work!");
  }

  @Override
  public List<Column> getForeignKeyColumnList(String catalogName, String schemaName, String tableName) {
    //TODO Auto-generated method stub
    throw new IllegalStateException("liyang didn't do his work!");
  }

  @Override
  public List<Column> getReferencedForeignKeyColumnList(String catalogName, String schemaName, String tableName) {
    //TODO Auto-generated method stub
    throw new IllegalStateException("liyang didn't do his work!");
  }

  @Override
  public JqGridTable getTableData(String tableName, JqGridTable jqGridTable) {
    //TODO Auto-generated method stub
    throw new IllegalStateException("liyang didn't do his work!");
  }

 
  

}
